package com.kundi.dooradmin.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Arrays;

/**
 * Author 赵恒
 * Date 2020/6/22
 */
@Entity
@Table(name = "tb_product")
public class Product {
    @Id
    private Integer id;
    @Column(name = "title_zh")
    private String titleZh;
    @Column(name = "title_en")
    private String titleEn;
    @Column(name = "content")
    private String content;
    @Column(name = "image")
    private byte[] image;
    @Column(name = "item_index")
    private Integer itemIndex;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitleZh() {
        return titleZh;
    }

    public void setTitleZh(String titleZh) {
        this.titleZh = titleZh;
    }

    public String getTitleEn() {
        return titleEn;
    }

    public void setTitleEn(String titleEn) {
        this.titleEn = titleEn;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public byte[] getImage() {
        return image;
    }

    public void setImage(byte[] image) {
        this.image = image;
    }

    public Integer getItemIndex() {
        return itemIndex;
    }

    public void setItemIndex(Integer itemIndex) {
        this.itemIndex = itemIndex;
    }

    @Override
    public String toString() {
        return "Product{" +
                "id=" + id +
                ", titleZh='" + titleZh + '\'' +
                ", titleEn='" + titleEn + '\'' +
                ", content='" + content + '\'' +
                ", image=" + Arrays.toString(image) +
                ", itemIndex=" + itemIndex +
                '}';
    }

}
